package main

import (
	"fmt"
	"math"
)

type BusinessException struct {
	Num     float64
	problem string
}

func (b BusinessException) Error() string {
	return fmt.Sprintf("Wrong !!!, because \"%f\" is a nagative number", b.Num)
}
func Sqrt1(f float64) (float64, error) {
	if f < 0 {
		return -1, BusinessException{Num: f}
	}
	return math.Sqrt(f), nil
}

func main() {
	result, err := Sqrt1(-13)
	if err != nil {
		fmt.Println(err)
	} else {
		fmt.Println(result)
	}
}
